<template>
	<view class="u-page">
		<view class="u-demo-block">
			<u-form
				:labelWidth="80"
				:model="formData"
				:rules="formRules"
				ref="form"
			>
				<!-- 输入设备号 -->
				<u-form-item
					label="设备号"
					required
					prop="machineNo"
					ref="machineNo">
					<u-input
						v-model="formData.machineNo"
						:disabled="disabled.machineNo"
						clearable
						:focus="focus.machineNo"
						@focus="machineFocus"
						@blur="machineNoBlur"
					></u-input>
				</u-form-item>
				<!-- 扫描二维码 -->
				<u-form-item
					v-show="show.otherItem"
					label="lotNo"
					required
					prop="lotNo"
					ref="lotNo">
					<u-input
						v-model="formData.lotNo"
						clearable
						:disabled="disabled.lotNo"
						required
						:focus="focus.lotNo"
						@focus="lotNoFocus"
						@blur="lotNoBlur">
					</u-input>
				</u-form-item>
				<u-form-item
					v-show="show.otherItem"
					label="形名"
					required
					prop="lotProductCode"
					ref="lotProductCode">
					<u-input
						v-model="formData.lotProductCode"
						:disabled="disabled.lotProductCode"
						clearable
						required
						:focus="focus.lotProductCode"
						@focus="lotProductCodeFocus"
						@blur="lotProductCodeBlur">
					</u-input>
				</u-form-item>
				<u-row gutter="10" v-show="show.lotInfo" >
					<u-col span="3" >
						<u-text
							text="形名: "
						></u-text>
					</u-col>
					<u-col span="9">
						<u-text
							type="success"
							:text="echo.productCode"
							class="preWhite"
						></u-text>
					</u-col>
				</u-row>
					
				<!-- 选择时间 -->
				<u-form-item
					v-show="show.otherItem"
					label="日期"
					required
					prop="recordTimeDT"
					ref="recordTimeDT"
					@click="recordTimeFormClick">
					<u-input
						v-model="formData.recordTimeDT"
						style="pointer-events: none"
						disabled
						disabledColor="#ffffff"
						placeholder="请选择记录时间"
						fontSize="13px"
						color="#12569F">
					</u-input>
				</u-form-item>
				<!-- 组立机台 -->
				<u-form-item
					v-show="show.otherItem"
					label="组立机台"
					required
					prop="zlMachineNo"
					ref="zlMachineNo"
					@click="zlPickerFormClick">
					<u-input
						v-model="formData.zlMachineNo"
						style="pointer-events: none"
						disabled
						disabledColor="#ffffff"
						placeholder="请选择组立设备"
						fontSize="13px"
						color="#12569F">
					</u-input>
				</u-form-item>
				<!-- 半田机台 -->
				<u-form-item
					v-show="show.otherItem"
					label="半田机台"
					required
					prop="btMachineNo"
					ref="btMachineNo"
					@click="btPickerFormClick">
					<u-input
						v-model="formData.btMachineNo"
						style="pointer-events: none"
						disabled
						disabledColor="#ffffff"
						placeholder="请选择半田设备"
						fontSize="13px"
						color="#12569F">
					</u-input>
				</u-form-item>
				<!-- 下面是具体数据(1列) -->
				<view
					v-show="show.otherItem" id="col1">
					<u-divider
						text="1列(点击展开)"
						lineColor="#12569F"
						@click="colData1Show">
					</u-divider>
					
					<u-form-item
						v-show="show.colData1"
						label="1列作业者"
						prop="userCode1"
						ref="userCode1">
						<u-input
							v-model="formData.userCode1"
							clearable
							@blur="userCode1Blur">
						</u-input>
					</u-form-item>
					<u-row gutter="10" class="ngEcho" v-show="show.colData1">
						<u-col span="3" >
							<u-text
								text="姓名:" 
							></u-text>
						</u-col>
						<u-col span="9">
							<u-text
								type="success"
								:text="echo.userCode1">
							</u-text>
						</u-col>
					</u-row>

					<!-- 1列未填充 -->
					<view class="wtc"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #ee7800;padding:10px 3px;">
							<u-text text="未填充检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData1"
								label="GO"
								prop="goWtcCount1"
								ref="goWtcCount1">
								<u-input
									v-model="formData.goWtcCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngWtcCount1"
								ref="ngWtcCount1">
								<u-input
									v-model="formData.ngWtcCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWtcPct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列侧面 -->
					<view class="cm"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #f6ad49;padding:10px 3px;">
							<u-text text="侧面检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goCmCount1"
								ref="goCmCount1">
								<u-input
									v-model="formData.goCmCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngCmCount1"
								ref="ngCmCount1">
								<u-input
									v-model="formData.ngCmCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngCmPct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列测2 -->
					<view class="c2"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #ffd900;padding:10px 3px;">
							<u-text text="测2计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC2Count1"
								ref="goC2Count1">
								<u-input
									v-model="formData.goC2Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngC2Count1"
								ref="ngC2Count1">
								<u-input
									v-model="formData.ngC2Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC2Pct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列测3 -->
					<view class="c3"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #7b8d42;padding:10px 3px;">
							<u-text text="测3计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC3Count1"
								ref="goC3Count1">
								<u-input
									v-model="formData.goC3Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngC3Count1"
								ref="ngC3Count1">
								<u-input
									v-model="formData.ngC3Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC3Pct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列测4 -->
					<view class="c4"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #00a497;padding:10px 3px;">
							<u-text text="测4计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC4Count1"
								ref="goC4Count1">
								<u-input
									v-model="formData.goC4Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngC4Count1"
								ref="ngC4Count1">
								<u-input
									v-model="formData.ngC4Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC4Pct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列测5 -->
					<view class="c5"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid ##2ca9e1;padding:10px 3px;">
							<u-text text="测5计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC5Count1"
								ref="goC5Count1">
								<u-input
									v-model="formData.goC5Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngC5Count1"
								ref="ngC5Count1">
								<u-input
									v-model="formData.ngC5Count1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC5Pct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列外观 -->
					<view class="wg"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #674598;padding:10px 3px;">
							<u-text text="外观检查计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goWgCount1"
								ref="goWgCount1">
								<u-input
									v-model="formData.goWgCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label=" NG"
								prop="ngWgCount1"
								ref="ngWgCount1">
								<u-input
									v-model="formData.ngWgCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWgPct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列机械 -->
					<view class="jx"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #8b968d;padding:10px 3px;">
							<u-text text="机械不良计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData1"
								label="NG"
								prop="ngJxCount1"
								ref="ngJxCount1">
								<u-input
									v-model="formData.ngJxCount1"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngJxPct1}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 1列解析 -->
					<view class="jiexi"
						v-show="show.colData1">
						<view style="border-bottom: 1px solid #8b968d;padding:10px 3px;">
							<u-text text="1列解析(10pcs)"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData1"
								label="解析良品"
								prop="jxOKCount"
								ref="jxOKCount">
								<u-input
									v-model="formData.jxOKCount"
									type="number"
									clearable
									@clear="formData.jxOKCount=''">
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label="VZ"
								prop="jxVZNGCount"
								ref="jxVZNGCount">
								<u-input
									v-model="formData.jxVZNGCount"
									type="number"
									@clear="formData.jxVZNGCount=''"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData1"
								label="ZZ"
								prop="jxZZNGCount"
								ref="jxZZNGCount">
								<u-input
									v-model="formData.jxZZNGCount"
									type="number"
									clearable
									@clear="formData.jxZZNGCount=''">
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="ZZ不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{jxZZPct}}</text>
								</u-col>
							</u-row>
							<u-form-item
								v-show="show.colData1"
								label="IR"
								prop="jxIRNGCount"
								ref="jxIRNGCount">
								<u-input
									v-model="formData.jxIRNGCount"
									type="number"
									@clear="formData.jxIRNGCount=''"
									clearable>
								</u-input>
							</u-form-item>
						</view>
					</view>
					<!-- 1列良品 -->
					<view class="okCount"  v-show="show.colData1">
						<u-form-item
							label="1列良品数"
							prop="okCount1"
							ref="okCount1">
							<u-input
								v-model="formData.okCount1"
								type="number"
								@change="autoEndFlag"
								clearable>
							</u-input>
						</u-form-item>
					</view>

				</view>
				
				<!-- 下面是具体数据(2列) -->
				<view
					v-show="show.otherItem" id="col2">
					<u-divider
						text="2列(点击展开)"
						lineColor="#12569F"
						@click="colData2Show">
					</u-divider>
					
					<u-form-item
						v-show="show.colData2"
						label="2列作业者"
						prop="userCode2"
						ref="userCode2">
						<u-input
							v-model="formData.userCode2"
							clearable
							@blur="userCode2Blur">
						</u-input>
					</u-form-item>
					<u-row gutter="10" class="ngEcho" v-show="show.colData2">
						<u-col span="3" >
							<u-text
								text="姓名:" 
							></u-text>
						</u-col>
						<u-col span="9">
							<u-text
								type="success"
								:text="echo.userCode2">
							</u-text>
						</u-col>
					</u-row>
					

					<!-- 2列未填充 -->
					<view class="wtc"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #ee7800;padding:10px 3px;">
							<u-text text="未填充检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData2"
								label="GO"
								prop="goWtcCount2"
								ref="goWtcCount2">
								<u-input
									v-model="formData.goWtcCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngWtcCount2"
								ref="ngWtcCount2">
								<u-input
									v-model="formData.ngWtcCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWtcPct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列侧面 -->
					<view class="cm"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #f6ad49;padding:10px 3px;">
							<u-text text="侧面检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goCmCount2"
								ref="goCmCount2">
								<u-input
									v-model="formData.goCmCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngCmCount2"
								ref="ngCmCount2">
								<u-input
									v-model="formData.ngCmCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngCmPct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列测2 -->
					<view class="c2"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #ffd900;padding:10px 3px;">
							<u-text text="测2计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC2Count2"
								ref="goC2Count2">
								<u-input
									v-model="formData.goC2Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngC2Count2"
								ref="ngC2Count2">
								<u-input
									v-model="formData.ngC2Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC2Pct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列测3 -->
					<view class="c3"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #7b8d42;padding:10px 3px;">
							<u-text text="测3计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC3Count2"
								ref="goC3Count2">
								<u-input
									v-model="formData.goC3Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngC3Count2"
								ref="ngC3Count2">
								<u-input
									v-model="formData.ngC3Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC3Pct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列测4 -->
					<view class="c4"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #00a497;padding:10px 3px;">
							<u-text text="测4计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC4Count2"
								ref="goC4Count2">
								<u-input
									v-model="formData.goC4Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngC4Count2"
								ref="ngC4Count2">
								<u-input
									v-model="formData.ngC4Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC4Pct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列测5 -->
					<view class="c5"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid ##2ca9e1;padding:10px 3px;">
							<u-text text="测5计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC5Count2"
								ref="goC5Count2">
								<u-input
									v-model="formData.goC5Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngC5Count2"
								ref="ngC5Count2">
								<u-input
									v-model="formData.ngC5Count2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC5Pct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列外观 -->
					<view class="wg"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #674598;padding:10px 3px;">
							<u-text text="外观检查计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goWgCount2"
								ref="goWgCount2">
								<u-input
									v-model="formData.goWgCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData2"
								label=" NG"
								prop="ngWgCount2"
								ref="ngWgCount2">
								<u-input
									v-model="formData.ngWgCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWgPct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列机械 -->
					<view class="jx"
						v-show="show.colData2">
						<view style="border-bottom: 1px solid #8b968d;padding:10px 3px;">
							<u-text text="机械不良计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData2"
								label="NG"
								prop="ngJxCount2"
								ref="ngJxCount2">
								<u-input
									v-model="formData.ngJxCount2"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngJxPct2}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 2列良品 -->
					<view class="okCount" v-show="show.colData2">
						<u-form-item
							label="2列良品数"
							prop="okCount2"
							ref="okCount2">
							<u-input
								v-model="formData.okCount2"
								type="number"
								@change="autoEndFlag"
								clearable>
							</u-input>
						</u-form-item>
					</view>

				</view>
				
				<!-- 下面是具体数据(3列) -->
				<view
				  v-show="show.otherItem" id='col3'>
				  <u-divider
				    text="3列(点击展开)"
				    lineColor="#12569F"
				    @click="colData3Show">
				  </u-divider>
				  
				  <u-form-item
				    v-show="show.colData3"
				    label="3列作业者"
				    prop="userCode3"
				    ref="userCode3">
				    <u-input
				      v-model="formData.userCode3"
				      clearable
				      @blur="userCode3Blur">
				    </u-input>
				  </u-form-item>
				  <u-row gutter="10" class="ngEcho" v-show="show.colData3">
				    <u-col span="3" >
				      <u-text
				        text="姓名:" 
				      ></u-text>
				    </u-col>
				    <u-col span="9">
				      <u-text
				        type="success"
				        :text="echo.userCode3">
				      </u-text>
				    </u-col>
				  </u-row>
				  

				  <!-- 3列未填充 -->
				  <view class="wtc"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #ee7800;padding:10px 3px;">
				      <u-text text="未填充检查机计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-show="show.colData3"
				        label="GO"
				        prop="goWtcCount3"
				        ref="goWtcCount3">
				        <u-input
				          v-model="formData.goWtcCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngWtcCount3"
				        ref="ngWtcCount3">
				        <u-input
				          v-model="formData.ngWtcCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngWtcPct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列侧面 -->
				  <view class="cm"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #f6ad49;padding:10px 3px;">
				      <u-text text="侧面检查机计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goCmCount3"
				        ref="goCmCount3">
				        <u-input
				          v-model="formData.goCmCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngCmCount3"
				        ref="ngCmCount3">
				        <u-input
				          v-model="formData.ngCmCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngCmPct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列测2 -->
				  <view class="c2"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #ffd900;padding:10px 3px;">
				      <u-text text="测2计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goC2Count3"
				        ref="goC2Count3">
				        <u-input
				          v-model="formData.goC2Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngC2Count3"
				        ref="ngC2Count3">
				        <u-input
				          v-model="formData.ngC2Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngC2Pct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列测3 -->
				  <view class="c3"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #7b8d42;padding:10px 3px;">
				      <u-text text="测3计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goC3Count3"
				        ref="goC3Count3">
				        <u-input
				          v-model="formData.goC3Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngC3Count3"
				        ref="ngC3Count3">
				        <u-input
				          v-model="formData.ngC3Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngC3Pct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列测4 -->
				  <view class="c4"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #00a497;padding:10px 3px;">
				      <u-text text="测4计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goC4Count3"
				        ref="goC4Count3">
				        <u-input
				          v-model="formData.goC4Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngC4Count3"
				        ref="ngC4Count3">
				        <u-input
				          v-model="formData.ngC4Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngC4Pct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列测5 -->
				  <view class="c5"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid ##2ca9e1;padding:10px 3px;">
				      <u-text text="测5计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goC5Count3"
				        ref="goC5Count3">
				        <u-input
				          v-model="formData.goC5Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngC5Count3"
				        ref="ngC5Count3">
				        <u-input
				          v-model="formData.ngC5Count3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngC5Pct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列外观 -->
				  <view class="wg"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #674598;padding:10px 3px;">
				      <u-text text="外观检查计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-if="false"
				        label="GO"
				        prop="goWgCount3"
				        ref="goWgCount3">
				        <u-input
				          v-model="formData.goWgCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-form-item
				        v-show="show.colData3"
				        label=" NG"
				        prop="ngWgCount3"
				        ref="ngWgCount3">
				        <u-input
				          v-model="formData.ngWgCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngWgPct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列机械 -->
				  <view class="jx"
				    v-show="show.colData3">
				    <view style="border-bottom: 1px solid #8b968d;padding:10px 3px;">
				      <u-text text="机械不良计数"></u-text>
				    </view>
				    <view style="padding: 0 5px;">
				      <u-form-item
				        v-show="show.colData3"
				        label="NG"
				        prop="ngJxCount3"
				        ref="ngJxCount3">
				        <u-input
				          v-model="formData.ngJxCount3"
				          type="number"
				          @change="autoEndFlag"
				          clearable>
				        </u-input>
				      </u-form-item>
				      <u-row gutter="10" class="ngEcho" v-show="show.otherItem">
				        <u-col span="4" >
				          <u-text
				            text="不良率: "
				          ></u-text>
				        </u-col>
				        <u-col span="8">
				          <text class="sumText">{{ngJxPct3}}</text>
				        </u-col>
				      </u-row>
				    </view>	
				    
				  </view>
				  <!-- 3列良品 -->
					<view class="okCount" v-show="show.colData3">
						<u-form-item
							label="3列良品数"
							prop="okCount3"
							ref="okCount3">
							<u-input
								v-model="formData.okCount3"
								type="number"
								@change="autoEndFlag"
								clearable>
							</u-input>
						</u-form-item>						
					</view>
				</view>
				
				 <!-- 下面是具体数据(4列) -->
				<view
					v-show="show.otherItem" id='col4'>
					<u-divider
						text="4列(点击展开)"
						lineColor="#12569F"
						@click="colData4Show">
					</u-divider>
					
					<u-form-item
						v-show="show.colData4"
						label="4列作业者"
						prop="userCode4"
						ref="userCode4">
						<u-input
							v-model="formData.userCode4"
							clearable
							@blur="userCode4Blur">
						</u-input>
					</u-form-item>
					<u-row gutter="10" class="ngEcho" v-show="show.colData4">
						<u-col span="3" >
							<u-text
								text="姓名:" 
							></u-text>
						</u-col>
						<u-col span="9">
							<u-text
								type="success"
								:text="echo.userCode4">
							</u-text>
						</u-col>
					</u-row>
					
					<!-- 4列未填充 -->
					<view class="wtc"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #ee7800;padding:10px 3px;">
							<u-text text="未填充检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData4"
								label="GO"
								prop="goWtcCount4"
								ref="goWtcCount4">
								<u-input
									v-model="formData.goWtcCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngWtcCount4"
								ref="ngWtcCount4">
								<u-input
									v-model="formData.ngWtcCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWtcPct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列侧面 -->
					<view class="cm"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #f6ad49;padding:10px 3px;">
							<u-text text="侧面检查机计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goCmCount4"
								ref="goCmCount4">
								<u-input
									v-model="formData.goCmCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngCmCount4"
								ref="ngCmCount4">
								<u-input
									v-model="formData.ngCmCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngCmPct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列测2 -->
					<view class="c2"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #ffd900;padding:10px 3px;">
							<u-text text="测2计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC2Count4"
								ref="goC2Count4">
								<u-input
									v-model="formData.goC2Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngC2Count4"
								ref="ngC2Count4">
								<u-input
									v-model="formData.ngC2Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC2Pct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列测3 -->
					<view class="c3"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #7b8d42;padding:10px 3px;">
							<u-text text="测3计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC3Count4"
								ref="goC3Count4">
								<u-input
									v-model="formData.goC3Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngC3Count4"
								ref="ngC3Count4">
								<u-input
									v-model="formData.ngC3Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC3Pct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列测4 -->
					<view class="c4"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #00a497;padding:10px 3px;">
							<u-text text="测4计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC4Count4"
								ref="goC4Count4">
								<u-input
									v-model="formData.goC4Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngC4Count4"
								ref="ngC4Count4">
								<u-input
									v-model="formData.ngC4Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC4Pct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列测5 -->
					<view class="c5"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid ##2ca9e1;padding:10px 3px;">
							<u-text text="测5计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goC5Count4"
								ref="goC5Count4">
								<u-input
									v-model="formData.goC5Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngC5Count4"
								ref="ngC5Count4">
								<u-input
									v-model="formData.ngC5Count4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngC5Pct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列外观 -->
					<view class="wg"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #674598;padding:10px 3px;">
							<u-text text="外观检查计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-if="false"
								label="GO"
								prop="goWgCount4"
								ref="goWgCount4">
								<u-input
									v-model="formData.goWgCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-form-item
								v-show="show.colData4"
								label=" NG"
								prop="ngWgCount4"
								ref="ngWgCount4">
								<u-input
									v-model="formData.ngWgCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngWgPct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列机械 -->
					<view class="jx"
						v-show="show.colData4">
						<view style="border-bottom: 1px solid #8b968d;padding:10px 3px;">
							<u-text text="机械不良计数"></u-text>
						</view>
						<view style="padding: 0 5px;">
							<u-form-item
								v-show="show.colData4"
								label="NG"
								prop="ngJxCount4"
								ref="ngJxCount4">
								<u-input
									v-model="formData.ngJxCount4"
									type="number"
									@change="autoEndFlag"
									clearable>
								</u-input>
							</u-form-item>
							<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
								<u-col span="4" >
									<u-text
										text="不良率: "
									></u-text>
								</u-col>
								<u-col span="8">
									<text class="sumText">{{ngJxPct4}}</text>
								</u-col>
							</u-row>
						</view>	
						
					</view>
					<!-- 4列良品 -->
					<view class="okCount" v-show="show.colData4">
						<u-form-item
							label="4列良品数"
							prop="okCount4"
							ref="okCount4">
							<u-input
								v-model="formData.okCount4"
								type="number"
								@change="autoEndFlag"
								clearable>
							</u-input>
						</u-form-item>
					</view>
				</view>
				
				<u-divider
					id='colTotal'
					v-show="show.otherItem"
					text="合计"
					lineColor="#12569F">					
				</u-divider>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="4" >
						<u-text
							text="合计良品: "
						></u-text>
					</u-col>
					<u-col span="8">
						<text style="color:#007b43;font-size:15px">{{okSum}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="合计不良: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngSum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngSumPercent}}</text>
					</u-col>
				</u-row>
			
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="未填充不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngWtcSum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngWtcSumPct}}</text>
					</u-col>
				</u-row>

				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="侧面不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngCmSum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngCmSumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="侧2不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngC2Sum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngC2SumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="侧3不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngC3Sum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngC3SumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="侧4不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngC4Sum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngC4SumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="侧5不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngC5Sum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngC5SumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="外观不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngWgSum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngWgSumPct}}</text>
					</u-col>
				</u-row>
				<u-row gutter="10" class="ngEcho" v-show="show.otherItem">
					<u-col span="5" >
						<u-text
							text="机械不良合计: "
						></u-text>
					</u-col>
					<u-col span="4">
						<text class="sumText">{{ngJxSum}}</text>
					</u-col>
					<u-col span="3">
						<text class="sumText">{{ngJxSumPct}}</text>
					</u-col>
				</u-row>
				<u-divider
					v-show="show.otherItem"
					text="确认"
					lineColor="#12569F">					
				</u-divider>
				<u-form-item
					v-show="show.otherItem"
					label="lot结束"
					prop="lotEnd">
					<u-switch
						v-model="formData.lotEndFlag">
						
					</u-switch>
				</u-form-item>
			</u-form>
			
			<u-button
				v-show="show.otherItem"
				type="primary"
				text="提交"
				customStyle="margin-top: 20px"
				:loading="submitBtn.loading"
				loadingMode="semicircle"
				@click="formSubmit">
			</u-button>
			
			<u-button
				type="warning"
				text="重置"
				plain
				customStyle="margin-top: 20px"
				@click="formReset">
			</u-button>
			<u-picker 
				:show="show.zlPicker" 
				:columns="zlMachineNoList"
				:closeOnClickOverlay="true"
				keyName="machineNo"
				@confirm="zlMachineConfirm"
				@close="show.zlPicker=false"
				@cancel="show.zlPicker=false">
			</u-picker>
			<u-picker 
				:show="show.btPicker" 
				:columns="btMachineNoList"
				:closeOnClickOverlay="true"
				keyName="machineNo"
				@confirm="btMachineConfirm"
				@close="show.btPicker=false"
				@cancel="show.btPicker=false">
			</u-picker>
			<u-calendar 
				:show="show.calendar"
				:defaultDate="defaultDate"
				:minDate="minDate"
				:maxDate="maxDate"
				:closeOnClickOverlay="true"
				mode="single"
				@confirm="calendarConfirm"
				@close="calendarClose">
			</u-calendar>
			<cc-suspensionMenu
				v-show="show.otherItem"
				ref="cc"
				:scrollShow="show.otherItem"
				colors="#fa436a"
				:iconList="iconList"
				@click="fabMenuClick">
				
			</cc-suspensionMenu>
		</view>
	</view>
</template>

<script>
import { getMachine4SSD1CD,getUSMZuLiMachineList,getUSMBtMachineList } from '@/api/machine/machine.js';
import { getUSMQrType } from '@/api/qrtype/qrtype.js';
import { addUsmCdRecord,getUsmCdRecordUnfinished } from '@/api/usmRecord/usmCdRecord.js';
import { getUserCodeEcho4UCD } from '@/api/user/user.js' 
import  dayjs from "dayjs"
export default {
	data() {
		return {
			formData: {
				lotNo:'',
				lotProductCode:'',
				lotInfo: '',
				machineNo: '',
				recordTimeDT:'',
				zlMachineNo:'',
				btMachineNo:'',
				okCount1:'',
				goWtcCount1:'',
				ngWtcCount1:'',
				goCmCount1:'',
				ngCmCount1:'',
				goC2Count1:'',
				ngC2Count1:'',
				goC3Count1:'',
				ngC3Count1:'',
				goC4Count1:'',
				ngC4Count1:'',
				goC5Count1:'',
				ngC5Count1:'',
				goWgCount1:'',
				ngWgCount1:'',
				ngJxCount1:'',
				userCode1:'',
				okCount2:'',
				goWtcCount2:'',
				ngWtcCount2:'',
				goCmCount2:'',
				ngCmCount2:'',
				goC2Count2:'',
				ngC2Count2:'',
				goC3Count2:'',
				ngC3Count2:'',
				goC4Count2:'',
				ngC4Count2:'',
				goC5Count2:'',
				ngC5Count2:'',
				goWgCount2:'',
				ngWgCount2:'',
				ngJxCount2:'',
				userCode2:'',
				okCount3:'',
				goWtcCount3:'',
				ngWtcCount3:'',
				goCmCount3:'',
				ngCmCount3:'',
				goC2Count3:'',
				ngC2Count3:'',
				goC3Count3:'',
				ngC3Count3:'',
				goC4Count3:'',
				ngC4Count3:'',
				goC5Count3:'',
				ngC5Count3:'',
				goWgCount3:'',
				ngWgCount3:'',
				ngJxCount3:'',
				userCode3:'',
				okCount4:'',
				goWtcCount4:'',
				ngWtcCount4:'',
				goCmCount4:'',
				ngCmCount4:'',
				goC2Count4:'',
				ngC2Count4:'',
				goC3Count4:'',
				ngC3Count4:'',
				goC4Count4:'',
				ngC4Count4:'',
				goC5Count4:'',
				ngC5Count4:'',
				goWgCount4:'',
				ngWgCount4:'',
				ngJxCount4:'',
				userCode4:'',
				jxOKCount:'',
				jxVZNGCount:'',
				jxZZNGCount:'',
				jxIRNGCount:'',
				lotEndFlag:false
			},
			formRules: {
				machineNo: [
					{
						type: 'string',
						required: true,
						message: '请输入设备号',
						trigger: ['blur', 'change']
					}
				],
				'lotNo': [
					{
						type:'string',
						len:12,
						required: true,
						message: '长度错误',
						trigger: ['blur']
					}
				],
				'lotInfo': {
					type: 'string',
					required: true,
					message: '请扫描二维码',
					trigger: ['blur', 'change']
				},
				'recordTimeDT':{
					type: 'string',
					required: true,
					message: '请选择日期',
					trigger: ['blur', 'change']
				},
				'zlMachineNo':{
					type: 'string',
					required: true,
					message: '请选择',
					trigger: ['blur', 'change']
				},
				'btMachineNo':{
					type: 'string',
					required: true,
					message: '请选择',
					trigger: ['blur', 'change']
				},			
				'jxOKCount':[
					{
						type:'number',
						max:10,
						message:'必须是数字',
						trigger: ['blur', 'change']
					},
					{
						validator:(rule,value,callback)=>{
							return (value*1)<=10
						},
						message:'最大10pcs',
						trigger: ['blur', 'change']
					}
				],
				'jxOKCount':[
					{
						type:'number',
						max:10,
						message:'必须是数字',
						trigger: ['blur', 'change']
					},
					{
						validator:(rule,value,callback)=>{
							if(uni.$u.test.isEmpty(value)) return true
							if((this.formData.jxOKCount*1+this.formData.jxVZNGCount*1+this.formData.jxZZNGCount*1+this.formData.jxIRNGCount*1)>10) return false 
							return (value*1)<=10
						},
						message:'最大10pcs',
						trigger: ['blur', 'change']
					}
				],
				'jxVZNGCount':[
					{
						type:'number',
						max:10,
						message:'必须是数字',
						trigger: ['blur', 'change']
					},
					{
						validator:(rule,value,callback)=>{
							if(uni.$u.test.isEmpty(value)) return true
							if((this.formData.jxOKCount*1+this.formData.jxVZNGCount*1+this.formData.jxZZNGCount*1+this.formData.jxIRNGCount*1)>10) return false 
							return (value*1)<=10
						},
						message:'最大10pcs',
						trigger: ['blur', 'change']
					}
				],
				'jxZZNGCount':[
					{
						type:'number',
						max:10,
						message:'必须是数字',
						trigger: ['blur', 'change']
					},
					{
						validator:(rule,value,callback)=>{
							if(uni.$u.test.isEmpty(value)) return true
							if((this.formData.jxOKCount*1+this.formData.jxVZNGCount*1+this.formData.jxZZNGCount*1+this.formData.jxIRNGCount*1)>10) return false 
							return (value*1)<=10
						},
						message:'最大10pcs',
						trigger: ['blur', 'change']
					}
				],
				'jxIRNGCount':[
					{
						type:'number',
						max:10,
						message:'必须是数字',
						trigger: ['blur', 'change']
					},
					{
						validator:(rule,value,callback)=>{
							if(uni.$u.test.isEmpty(value)) return true
							if((this.formData.jxOKCount*1+this.formData.jxVZNGCount*1+this.formData.jxZZNGCount*1+this.formData.jxIRNGCount*1)>10) return false 
							return (value*1)<=10
						},
						message:'最大10pcs',
						trigger: ['blur', 'change']
					}
				],
				
			},
			focus: {
				machineNo: false,
				lotInfo: false,
				lotNo:false,
				lotProductCode:false,
			},
			echo: {
				lotNo: '',
				productCode: '',
				ymcCheckUserFullName:'',
				userCode1:'',
				userCode2:'',
				userCode3:'',
				userCode4:'',
			},
			disabled: {
				machineNo: false,
				lotNo:false,
				lotProductCode: false 
			},
			show: {
				otherItem: false,
				lotInfo:false,
				calendar:false,
				zlPicker:false,
				btPicker:false,
				colData1:false,
				colData2:false,
				colData3:false,
				colData4:false,
			},
			timer: {			
				lotNo: 0,
				lotProductCode:0,
				lotInfo: 0,
				machineNo: 0
			},
			qrCode:{
				lotNoFrom:0,
				lotNoLength:0,
				pnFrom:0,
				pnLength:0
			},
			defaultDate: dayjs().format('YYYY-MM-DD'),
			minDate:dayjs().subtract(1,'month').format('YYYY-MM-DD'),
			maxDate:dayjs().add(1,'day').format('YYYY-MM-DD'),
			zlMachineNoList:[[]],
			btMachineNoList:[[]],
			submitBtn:{
				loading:false
			},
			iconList:[
				{
					name:'1',
					icon:require('../../static/1.png')
				},
				{
					name:'2',
					icon:require('../../static/2.png')
				},
				{
					name:'3',
					icon:require('../../static/3.png')
				},
				{
					name:'4',
					icon:require('../../static/4.png')
				},
				{
					name:'total',
					icon:require('../../static/total.png')
				}
			]
		};
	},
	onShow() {
		this.$nextTick(() => {
			this.focus.machineNo = true;
			this.formData.recordTimeDT=dayjs().format('YYYY-MM-DD')
			if(dayjs().hour()<7){
				this.formData.recordTimeDT=dayjs().subtract(1,'day').format('YYYY-MM-DD')
			} 
		});
	},
	onUnload() {
		//清除计数器
		clearTimeout(this.timer.lotInfo);
		clearTimeout(this.timer.machineNo);
	},
	onNavigationBarButtonTap(e) {
		if (e.type === 'menu') {
			this.showMenuDrawer();
		} else if (e.type === 'home') {
			uni.reLaunch({
				url: '/pages/index/index'
			});
		}
	},
	computed:{
		ngWtcPct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngWtcCount1*1)/total1)*100).toFixed(3)+'%'
		},
		ngCmPct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngCmCount1*1)/total1)*100).toFixed(3)+'%'
		},
		ngC2Pct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngC2Count1*1)/total1)*100).toFixed(3)+'%'
		},
		ngC3Pct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngC3Count1*1)/total1)*100).toFixed(3)+'%'
		},
		ngC4Pct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngC4Count1*1)/total1)*100).toFixed(3)+'%'
		},
		ngC5Pct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngC5Count1*1)/total1)*100).toFixed(3)+'%'
		},
		ngWgPct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngWgCount1*1)/total1)*100).toFixed(3)+'%'
		},
		ngJxPct1(){
			let total1 = this.formData.okCount1*1+this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1
			if(total1==0) return '0%'
			return (((this.formData.ngJxCount1*1)/total1)*100).toFixed(3)+'%'
		},
		ngWtcPct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngWtcCount2*1)/total2)*100).toFixed(3)+'%'
		},
		ngCmPct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngCmCount2*1)/total2)*100).toFixed(3)+'%'
		},
		ngC2Pct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngC2Count2*1)/total2)*100).toFixed(3)+'%'
		},
		ngC3Pct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngC3Count2*1)/total2)*100).toFixed(3)+'%'
		},
		ngC4Pct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngC4Count2*1)/total2)*100).toFixed(3)+'%'
		},
		ngC5Pct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngC5Count2*1)/total2)*100).toFixed(3)+'%'
		},
		ngWgPct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngWgCount2*1)/total2)*100).toFixed(3)+'%'
		},
		ngJxPct2(){
			let total2 = this.formData.okCount2*1+this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1
			if(total2==0) return '0%'
			return (((this.formData.ngJxCount2*1)/total2)*100).toFixed(3)+'%'
		},
		ngWtcPct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngWtcCount3*1)/total3)*100).toFixed(3)+'%'
		},
		ngCmPct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngCmCount3*1)/total3)*100).toFixed(3)+'%'
		},
		ngC2Pct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngC2Count3*1)/total3)*100).toFixed(3)+'%'
		},
		ngC3Pct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngC3Count3*1)/total3)*100).toFixed(3)+'%'
		},
		ngC4Pct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngC4Count3*1)/total3)*100).toFixed(3)+'%'
		},
		ngC5Pct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngC5Count3*1)/total3)*100).toFixed(3)+'%'
		},
		ngWgPct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngWgCount3*1)/total3)*100).toFixed(3)+'%'
		},
		ngJxPct3(){
			let total3 = this.formData.okCount3*1+this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1
			if(total3==0) return '0%'
			return (((this.formData.ngJxCount3*1)/total3)*100).toFixed(3)+'%'
		},
		ngWtcPct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngWtcCount4*1)/total4)*100).toFixed(3)+'%'
		},
		ngCmPct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngCmCount4*1)/total4)*100).toFixed(3)+'%'
		},
		ngC2Pct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngC2Count4*1)/total4)*100).toFixed(3)+'%'
		},
		ngC3Pct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngC3Count4*1)/total4)*100).toFixed(3)+'%'
		},
		ngC4Pct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngC4Count4*1)/total4)*100).toFixed(3)+'%'
		},
		ngC5Pct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngC5Count4*1)/total4)*100).toFixed(3)+'%'
		},
		ngWgPct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngWgCount4*1)/total4)*100).toFixed(3)+'%'
		},
		ngJxPct4(){
			let total4 = this.formData.okCount4*1+this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1
			if(total4==0) return '0%'
			return (((this.formData.ngJxCount4*1)/total4)*100).toFixed(3)+'%'
		},
		okSum(){
			let total=this.formData.okCount1*1+this.formData.okCount2*1+this.formData.okCount3*1+this.formData.okCount4*1
			return total
		},
		ngSum(){
			return (this.formData.ngWtcCount1*1+this.formData.ngCmCount1*1+this.formData.ngC2Count1*1+this.formData.ngC3Count1*1+this.formData.ngC4Count1*1+this.formData.ngC5Count1*1+this.formData.ngWgCount1*1+this.formData.ngJxCount1*1) + (this.formData.ngWtcCount2*1+this.formData.ngCmCount2*1+this.formData.ngC2Count2*1+this.formData.ngC3Count2*1+this.formData.ngC4Count2*1+this.formData.ngC5Count2*1+this.formData.ngWgCount2*1+this.formData.ngJxCount2*1) +(this.formData.ngWtcCount3*1+this.formData.ngCmCount3*1+this.formData.ngC2Count3*1+this.formData.ngC3Count3*1+this.formData.ngC4Count3*1+this.formData.ngC5Count3*1+this.formData.ngWgCount3*1+this.formData.ngJxCount3*1)+ (this.formData.ngWtcCount4*1+this.formData.ngCmCount4*1+this.formData.ngC2Count4*1+this.formData.ngC3Count4*1+this.formData.ngC4Count4*1+this.formData.ngC5Count4*1+this.formData.ngWgCount4*1+this.formData.ngJxCount4*1)
		},
		ngSumPercent(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngSum/(this.okSum+this.ngSum))*100).toFixed(3) +'%'
		},
		ngWtcSum(){
			return this.formData.ngWtcCount1*1+this.formData.ngWtcCount2*1+this.formData.ngWtcCount3*1+this.formData.ngWtcCount4*1
		},
		ngWtcSumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngWtcSum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngCmSum(){
			return this.formData.ngCmCount1*1+this.formData.ngCmCount2*1+this.formData.ngCmCount3*1+this.formData.ngCmCount4*1
		},
		ngCmSumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngCmSum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngC2Sum(){
			return this.formData.ngC2Count1*1+this.formData.ngC2Count2*1+this.formData.ngC2Count3*1+this.formData.ngC2Count4*1
		},
		ngC2SumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngC2Sum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngC3Sum(){
			return this.formData.ngC3Count1*1+this.formData.ngC3Count2*1+this.formData.ngC3Count3*1+this.formData.ngC3Count4*1
		},
		ngC3SumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngC3Sum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngC4Sum(){
			return this.formData.ngC4Count1*1+this.formData.ngC4Count2*1+this.formData.ngC4Count3*1+this.formData.ngC4Count4*1
		},
		ngC4SumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngC4Sum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngC5Sum(){
			return this.formData.ngC5Count1*1+this.formData.ngC5Count2*1+this.formData.ngC5Count3*1+this.formData.ngC5Count4*1
		},
		ngC5SumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngC5Sum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngWgSum(){
			return this.formData.ngWgCount1*1+this.formData.ngWgCount2*1+this.formData.ngWgCount3*1+this.formData.ngWgCount4*1
		},
		ngWgSumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngWgSum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		ngJxSum(){
			return this.formData.ngJxCount1*1+this.formData.ngJxCount2*1+this.formData.ngJxCount3*1+this.formData.ngJxCount4*1
		},
		ngJxSumPct(){
			if((this.okSum+this.ngSum)==0) return '0%'
			return ((this.ngJxSum/(this.okSum+this.ngSum))*100).toFixed(3)+'%'
		},
		jxZZPct(){
			if(uni.$u.test.isEmpty(this.formData.jxZZNGCount)) return '0%'

			return (((this.formData.jxZZNGCount*1)/(this.formData.jxOKCount*1+this.formData.jxVZNGCount*1+this.formData.jxZZNGCount*1+this.formData.jxIRNGCount*1))*100).toFixed(0) + '%'
		}
	},

	methods: {
		machineFocus() {
			uni.$u.sleep(100).then(() => {
				// #ifdef APP-PLUS
				uni.hideKeyboard();
				// #endif
			});
		},
		machineNoBlur() {
			this.timer.machineNo = setTimeout(() => {
				this.$refs.form.validateField('machineNo');
				if(uni.$u.test.isEmpty(this.formData.machineNo)) return
				getMachine4SSD1CD({ machineNo: this.formData.machineNo })
					.then((res) => {
						this.disabled.machineNo = true;
						this.disabled.lotProductCode=true
						this.disabled.lotNo=true
						this.show.otherItem = true;
						this.focus.machineNo = false;
						this.focus.lotInfo = true;
						this.focus.lotNo =true
						getUsmCdRecordUnfinished({machineNo:this.formData.machineNo})
							.then(res=>{
								this.formData.lotNo=res.data.lotNo
								this.show.lotInfo=true
								this.echo.productCode=res.data.productCode
								this.formData.recordTimeDT=res.data.recordTimeDT
								this.formData.zlMachineNo = res.data.zlMachineNo
								this.formData.btMachineNo=res.data.btMachineNo
								this.formData.userCode1=res.data.userCode1
								if(!uni.$u.test.isEmpty(this.formData.userCode1)){
									getUserCodeEcho4UCD({userCode:this.formData.userCode1})
										.then(res=>{
											this.echo.userCode1=res.data.usersPO.userFullName
										})
										.catch(err=>{
											this.formData.userCode1=''
										})
								}
								this.formData.okCount1=(res.data.okCount1*1==0)?'':res.data.okCount1
								this.formData.goWtcCount1=(res.data.goWtcCount1*1==0)?'':res.data.goWtcCount1
								this.formData.ngWtcCount1=(res.data.ngWtcCount1*1==0)?'':res.data.ngWtcCount1
								this.formData.goCmCount1=(res.data.goCmCount1*1==0)?'':res.data.goCmCount1
								this.formData.ngCmCount1=(res.data.ngCmCount1*1==0)?'':res.data.ngCmCount1
								this.formData.goC2Count1=(res.data.goC2Count1*1==0)?'':res.data.goC2Count1
								this.formData.ngC2Count1=(res.data.ngC2Count1*1==0)?'':res.data.ngC2Count1
								this.formData.goC3Count1=(res.data.goC3Count1*1==0)?'':res.data.goC3Count1
								this.formData.ngC3Count1=(res.data.ngC3Count1*1==0)?'':res.data.ngC3Count1
								this.formData.goC4Count1=(res.data.goC4Count1*1==0)?'':res.data.goC4Count1
								this.formData.ngC4Count1=(res.data.ngC4Count1*1==0)?'':res.data.ngC4Count1
								this.formData.goC5Count1=(res.data.goC5Count1*1==0)?'':res.data.goC5Count1
								this.formData.ngC5Count1=(res.data.ngC5Count1*1==0)?'':res.data.ngC5Count1
								this.formData.goWgCount1=(res.data.goWgCount1*1==0)?'':res.data.goWgCount1
								this.formData.ngWgCount1=(res.data.ngWgCount1*1==0)?'':res.data.ngWgCount1
								this.formData.ngJxCount1=(res.data.ngJxCount1*1==0)?'':res.data.ngJxCount1
								this.formData.jxOKCount=(res.data.jxOKCount*1==0)?'':res.data.jxOKCount
								this.formData.jxVZNGCount=(res.data.jxVZNGCount*1==0)?'':res.data.jxVZNGCount
								this.formData.jxZZNGCount=(res.data.jxZZNGCount*1==0)?'':res.data.jxZZNGCount
								this.formData.jxIRNGCount=(res.data.jxIRNGCount*1==0)?'':res.data.jxIRNGCount
								this.formData.userCode2=res.data.userCode2
								if(!uni.$u.test.isEmpty(this.formData.userCode2)){
									getUserCodeEcho4UCD({userCode:this.formData.userCode2})
										.then(res=>{
											this.echo.userCode2=res.data.usersPO.userFullName
										})
										.catch(err=>{
											this.formData.userCode2=''
										})
								}
								this.formData.okCount2=(res.data.okCount2*1==0)?'':res.data.okCount2
								this.formData.goWtcCount2=(res.data.goWtcCount2*1==0)?'':res.data.goWtcCount2
								this.formData.ngWtcCount2=(res.data.ngWtcCount2*1==0)?'':res.data.ngWtcCount2
								this.formData.goCmCount2=(res.data.goCmCount2*1==0)?'':res.data.goCmCount2
								this.formData.ngCmCount2=(res.data.ngCmCount2*1==0)?'':res.data.ngCmCount2
								this.formData.goC2Count2=(res.data.goC2Count2*1==0)?'':res.data.goC2Count2
								this.formData.ngC2Count2=(res.data.ngC2Count2*1==0)?'':res.data.ngC2Count2
								this.formData.goC3Count2=(res.data.goC3Count2*1==0)?'':res.data.goC3Count2
								this.formData.ngC3Count2=(res.data.ngC3Count2*1==0)?'':res.data.ngC3Count2
								this.formData.goC4Count2=(res.data.goC4Count2*1==0)?'':res.data.goC4Count2
								this.formData.ngC4Count2=(res.data.ngC4Count2*1==0)?'':res.data.ngC4Count2
								this.formData.goC5Count2=(res.data.goC5Count2*1==0)?'':res.data.goC5Count2
								this.formData.ngC5Count2=(res.data.ngC5Count2*1==0)?'':res.data.ngC5Count2
								this.formData.goWgCount2=(res.data.goWgCount2*1==0)?'':res.data.goWgCount2
								this.formData.ngWgCount2=(res.data.ngWgCount2*1==0)?'':res.data.ngWgCount2
								this.formData.ngJxCount2=(res.data.ngJxCount2*1==0)?'':res.data.ngJxCount2
								this.formData.userCode3=res.data.userCode3
								if(!uni.$u.test.isEmpty(this.formData.userCode3)){
									getUserCodeEcho4UCD({userCode:this.formData.userCode3})
										.then(res=>{
											this.echo.userCode3=res.data.usersPO.userFullName
										})
										.catch(err=>{
											this.formData.userCode3=''
										})
								}
								this.formData.okCount3=(res.data.okCount3*1==0)?'':res.data.okCount3
								this.formData.goWtcCount3=(res.data.goWtcCount3*1==0)?'':res.data.goWtcCount3
								this.formData.ngWtcCount3=(res.data.ngWtcCount3*1==0)?'':res.data.ngWtcCount3
								this.formData.goCmCount3=(res.data.goCmCount3*1==0)?'':res.data.goCmCount3
								this.formData.ngCmCount3=(res.data.ngCmCount3*1==0)?'':res.data.ngCmCount3
								this.formData.goC2Count3=(res.data.goC2Count3*1==0)?'':res.data.goC2Count3
								this.formData.ngC2Count3=(res.data.ngC2Count3*1==0)?'':res.data.ngC2Count3
								this.formData.goC3Count3=(res.data.goC3Count3*1==0)?'':res.data.goC3Count3
								this.formData.ngC3Count3=(res.data.ngC3Count3*1==0)?'':res.data.ngC3Count3
								this.formData.goC4Count3=(res.data.goC4Count3*1==0)?'':res.data.goC4Count3
								this.formData.ngC4Count3=(res.data.ngC4Count3*1==0)?'':res.data.ngC4Count3
								this.formData.goC5Count3=(res.data.goC5Count3*1==0)?'':res.data.goC5Count3
								this.formData.ngC5Count3=(res.data.ngC5Count3*1==0)?'':res.data.ngC5Count3
								this.formData.goWgCount3=(res.data.goWgCount3*1==0)?'':res.data.goWgCount3
								this.formData.ngWgCount3=(res.data.ngWgCount3*1==0)?'':res.data.ngWgCount3
								this.formData.ngJxCount3=(res.data.ngJxCount3*1==0)?'':res.data.ngJxCount3
								this.formData.userCode4=res.data.userCode4
								if(!uni.$u.test.isEmpty(this.formData.userCode4)){
									getUserCodeEcho4UCD({userCode:this.formData.userCode2})
										.then(res=>{
											this.echo.userCode4=res.data.usersPO.userFullName
										})
										.catch(err=>{
											this.formData.userCode4=''
										})
								}
								this.formData.okCount4=(res.data.okCount4*1==0)?'':res.data.okCount4
								this.formData.goWtcCount4=(res.data.goWtcCount4*1==0)?'':res.data.goWtcCount4
								this.formData.ngWtcCount4=(res.data.ngWtcCount4*1==0)?'':res.data.ngWtcCount4
								this.formData.goCmCount4=(res.data.goCmCount4*1==0)?'':res.data.goCmCount4
								this.formData.ngCmCount4=(res.data.ngCmCount4*1==0)?'':res.data.ngCmCount4
								this.formData.goC2Count4=(res.data.goC2Count4*1==0)?'':res.data.goC2Count4
								this.formData.ngC2Count4=(res.data.ngC2Count4*1==0)?'':res.data.ngC2Count4
								this.formData.goC3Count4=(res.data.goC3Count4*1==0)?'':res.data.goC3Count4
								this.formData.ngC3Count4=(res.data.ngC3Count4*1==0)?'':res.data.ngC3Count4
								this.formData.goC4Count4=(res.data.goC4Count4*1==0)?'':res.data.goC4Count4
								this.formData.ngC4Count4=(res.data.ngC4Count4*1==0)?'':res.data.ngC4Count4
								this.formData.goC5Count4=(res.data.goC5Count4*1==0)?'':res.data.goC5Count4
								this.formData.ngC5Count4=(res.data.ngC5Count4*1==0)?'':res.data.ngC5Count4
								this.formData.goWgCount4=(res.data.goWgCount4*1==0)?'':res.data.goWgCount4
								this.formData.ngWgCount4=(res.data.ngWgCount4*1==0)?'':res.data.ngWgCount4
								this.formData.ngJxCount4=(res.data.ngJxCount4*1==0)?'':res.data.ngJxCount4
								uni.$u.sleep(200).then(()=>{
									this.formData.lotEndFlag=res.data.lotEndFlag
								})
							})
							.catch(err=>{
								this.disabled.lotNo=false
								this.disabled.lotProductCode=false
								uni.$u.toast(err.msg||err.message)
							})
					})
					.catch((err) => {
						uni.$u.toast(err.msg||err.message)
					});
					
			}, 666);
		},
		lotNoFocus(){
			uni.$u.sleep(100).then(() => {
				// #ifdef APP-PLUS
				uni.hideKeyboard();
				// #endif
				
			})
		},
		lotNoBlur(){
			uni.$u.sleep(666).then(() => {
				if(uni.$u.test.isEmpty(this.formData.lotNo)) return
				this.$refs.form.validateField('lotNo');
				// 换焦点
				this.focus.lotNo=false
				this.$nextTick(()=>{
					this.focus.lotProductCode=true
				})
			})
		},
		lotProductCodeFocus(){
			uni.$u.sleep(100).then(() => {
				// #ifdef APP-PLUS
				uni.hideKeyboard();
				// #endif				
			})
		},
		lotProductCodeBlur(){
				uni.$u.sleep(666).then(() => {
					if(uni.$u.test.isEmpty(this.formData.lotProductCode)) return
					getUSMQrType()
						.then((res) => {
							this.qrCode.lotNoFrom=res.data.lotNoFrom
							this.qrCode.lotNoLength =res.data.lotNoLength
							this.qrCode.pnFrom = res.data.pnFrom
							this.qrCode.pnLength = res.data.pnLength
							this.show.lotInfo=true
							this.echo.productCode=this.formData.lotProductCode.substr(this.qrCode.pnFrom,this.qrCode.pnLength)
						})
						.catch((err) => {
							uni.showToast({
								title: err.msg || err.message || '服务器异常',
								icon: 'error'
							});
						});
				})
		},		

		recordTimeFormClick(){
			if(dayjs().hour()<7){
				this.defaultDate=dayjs().subtract(1,'day').format('YYYY-MM-DD')
			} 
			this.$nextTick(()=>{
				this.show.calendar=true
			})
		},
		calendarConfirm(e){
			if((!uni.$u.test.isEmpty(e))&&(uni.$u.test.array(e))){
				this.formData.recordTimeDT=e[0]
			}
			this.show.calendar=false
		},
		calendarClose(){
			this.show.calendar=false
		},
		zlPickerFormClick(){
			const _this=this
			getUSMZuLiMachineList()
				.then(res=>{
					this.zlMachineNoList=[res.data]
					this.$nextTick(()=>{
						_this.show.zlPicker=true
					})
				})
				.catch(err=>{
					uni.showToast({
						title: err.msg || err.message || '服务器异常',
						icon: 'error'
					});
				})
		},
		zlMachineConfirm(selected){
			if(!uni.$u.test.array(selected.value)) return
			this.formData.zlMachineNo=selected.value[0].machineNo
			this.show.zlPicker=false
		},
		btPickerFormClick(){
			const _this=this
			getUSMBtMachineList()
				.then(res=>{
					this.btMachineNoList=[res.data]
					this.$nextTick(()=>{
						_this.show.btPicker=true
					})
				})
				.catch(err=>{
					uni.showToast({
						title: err.msg || err.message || '服务器异常',
						icon: 'error'
					});
				})
		},
		btMachineConfirm(selected){
			if(!uni.$u.test.array(selected.value)) return
			this.formData.btMachineNo=selected.value[0].machineNo
			this.show.btPicker=false
		},
		// 第一列数据的方法
		// 第一列数据输入显示反转
		colData1Show(){
			this.show.colData1=(!this.show.colData1)
		},
		userCode1Blur(){
			uni.$u.sleep(500).then(()=>{
				if(uni.$u.test.isEmpty(this.formData.userCode1)) return
				getUserCodeEcho4UCD({userCode:this.formData.userCode1})
					.then(res=>{
						this.echo.userCode1=res.data.usersPO.userFullName
					})
					.catch(err=>{
						uni.showToast({
							title: '未找到此员工',
							icon: 'error'
						});
						this.formData.userCode1=''
					})
			})
		},
		// 第2列数据的方法
		// 第2列数据输入显示反转
		colData2Show(){
			this.show.colData2=(!this.show.colData2)
		},
		userCode2Blur(){
			uni.$u.sleep(500).then(()=>{
				if(uni.$u.test.isEmpty(this.formData.userCode2)) return
				getUserCodeEcho4UCD({userCode:this.formData.userCode2})
					.then(res=>{
						this.echo.userCode2=res.data.usersPO.userFullName
					})
					.catch(err=>{
						uni.showToast({
							title: '未找到此员工',
							icon: 'error'
						});
						this.formData.userCode2=''
					})
			})
		},
		// 第3列数据的方法
		// 第3列数据输入显示反转
		colData3Show(){
			this.show.colData3=(!this.show.colData3)
		},
		userCode3Blur(){
			uni.$u.sleep(500).then(()=>{
				if(uni.$u.test.isEmpty(this.formData.userCode3)) return
				getUserCodeEcho4UCD({userCode:this.formData.userCode3})
					.then(res=>{
						this.echo.userCode3=res.data.usersPO.userFullName
					})
					.catch(err=>{
						uni.showToast({
							title: '未找到此员工',
							icon: 'error'
						});
						this.formData.userCode3=''
					})
			})
		},
		// 第4列数据的方法
		// 第4列数据输入显示反转
		colData4Show(){
			this.show.colData4=(!this.show.colData4)
		},
		userCode4Blur(){
			uni.$u.sleep(500).then(()=>{
				if(uni.$u.test.isEmpty(this.formData.userCode4)) return
				getUserCodeEcho4UCD({userCode:this.formData.userCode4})
					.then(res=>{
						this.echo.userCode4=res.data.usersPO.userFullName
					})
					.catch(err=>{
						uni.showToast({
							title: '未找到此员工',
							icon: 'error'
						});
						this.formData.userCode4=''
					})
			})
		},
		
		autoEndFlag(e){			
			if(
				this.formData.okCount1*1>0 &&
				this.formData.okCount2*1>0 &&
				this.formData.okCount3*1>0 &&
				this.formData.okCount4*1>0
			){
				this.formData.lotEndFlag=true
			} else {
				this.formData.lotEndFlag =false
			}
			
		},
		fabMenuClick(item){
			const that=this
			let queryID=''
			if(item.name=="1"){
				queryID='#col1'
			} else if(item.name=='2'){
				queryID='#col2'
			} else if(item.name=='3'){
				queryID='#col3'
			} else if(item.name=='4'){
				queryID='#col4'
			} else {
				queryID='#colTotal'
			}
			
			uni.createSelectorQuery().select(queryID).boundingClientRect(res=>{
				uni.createSelectorQuery().select('.u-page').boundingClientRect(res1=>{
					uni.pageScrollTo({
							duration: 100, //过渡时间
							scrollTop: res.top - res1.top, //到达距离顶部的top值
					})
					
					that.$refs.cc.onclose();
					
				}).exec()
			}).exec()
		},

		formSubmit(){
			const _this=this;
			if((!uni.$u.test.isEmpty(this.formData.userCode1))&&(uni.$u.test.isEmpty(this.echo.userCode1))){
				uni.showToast({
					title: '用户1验证失败',
					icon: 'error'
				});
				return 
			}
			if((!uni.$u.test.isEmpty(this.formData.userCode2))&&(uni.$u.test.isEmpty(this.echo.userCode2))){
				uni.showToast({
					title: '用户2验证失败',
					icon: 'error'
				});
				return 
			}
			if((!uni.$u.test.isEmpty(this.formData.userCode3))&&(uni.$u.test.isEmpty(this.echo.userCode3))){
				uni.showToast({
					title: '用户3验证失败',
					icon: 'error'
				});
				return 
			}
			if((!uni.$u.test.isEmpty(this.formData.userCode4))&&(uni.$u.test.isEmpty(this.echo.userCode4))){
				uni.showToast({
					title: '用户4验证失败',
					icon: 'error'
				});
				return 
			}
			// 数据验证
			this.$refs.form.validate()
				.then(res=>{		//成功时返回true
					uni.showModal({
						title:'上传',
						content:'确认数据上传?',
						success:(res)=>{
							if(res.confirm){
								const uploadData={
									machineNo:this.formData.machineNo,
									lotNo:this.formData.lotNo,
									productCode:this.echo.productCode,
									recordTimeDT:this.formData.recordTimeDT,
									zlMachineNo:this.formData.zlMachineNo,
									btMachineNo:this.formData.btMachineNo,
									userCode1:this.formData.userCode1,
									okCount1:this.formData.okCount1*1,
									goWtcCount1:this.formData.goWtcCount1*1,
									ngWtcCount1:this.formData.ngWtcCount1*1,
									goCmCount1:this.formData.goCmCount1*1,
									ngCmCount1:this.formData.ngCmCount1*1,
									goC2Count1:this.formData.goC2Count1*1,
									ngC2Count1:this.formData.ngC2Count1*1,
									goC3Count1:this.formData.goC3Count1*1,
									ngC3Count1:this.formData.ngC3Count1*1,
									goC4Count1:this.formData.goC4Count1*1,
									ngC4Count1:this.formData.ngC4Count1*1,
									goC5Count1:this.formData.goC5Count1*1,
									ngC5Count1:this.formData.ngC5Count1*1,
									goWgCount1:this.formData.goWgCount1*1,
									ngWgCount1:this.formData.ngWgCount1*1,
									ngJxCount1:this.formData.ngJxCount1*1,
									userCode2:this.formData.userCode2,
									okCount2:this.formData.okCount2*1,
									goWtcCount2:this.formData.goWtcCount2*1,
									ngWtcCount2:this.formData.ngWtcCount2*1,
									goCmCount2:this.formData.goCmCount2*1,
									ngCmCount2:this.formData.ngCmCount2*1,
									goC2Count2:this.formData.goC2Count2*1,
									ngC2Count2:this.formData.ngC2Count2*1,
									goC3Count2:this.formData.goC3Count2*1,
									ngC3Count2:this.formData.ngC3Count2*1,
									goC4Count2:this.formData.goC4Count2*1,
									ngC4Count2:this.formData.ngC4Count2*1,
									goC5Count2:this.formData.goC5Count2*1,
									ngC5Count2:this.formData.ngC5Count2*1,
									goWgCount2:this.formData.goWgCount2*1,
									ngWgCount2:this.formData.ngWgCount2*1,
									ngJxCount2:this.formData.ngJxCount2*1,
									userCode3:this.formData.userCode3,
									okCount3:this.formData.okCount3*1,
									goWtcCount3:this.formData.goWtcCount3*1,
									ngWtcCount3:this.formData.ngWtcCount3*1,
									goCmCount3:this.formData.goCmCount3*1,
									ngCmCount3:this.formData.ngCmCount3*1,
									goC2Count3:this.formData.goC2Count3*1,
									ngC2Count3:this.formData.ngC2Count3*1,
									goC3Count3:this.formData.goC3Count3*1,
									ngC3Count3:this.formData.ngC3Count3*1,
									goC4Count3:this.formData.goC4Count3*1,
									ngC4Count3:this.formData.ngC4Count3*1,
									goC5Count3:this.formData.goC5Count3*1,
									ngC5Count3:this.formData.ngC5Count3*1,
									goWgCount3:this.formData.goWgCount3*1,
									ngWgCount3:this.formData.ngWgCount3*1,
									ngJxCount3:this.formData.ngJxCount3*1,
									userCode4:this.formData.userCode4,
									okCount4:this.formData.okCount4*1,
									goWtcCount4:this.formData.goWtcCount4*1,
									ngWtcCount4:this.formData.ngWtcCount4*1,
									goCmCount4:this.formData.goCmCount4*1,
									ngCmCount4:this.formData.ngCmCount4*1,
									goC2Count4:this.formData.goC2Count4*1,
									ngC2Count4:this.formData.ngC2Count4*1,
									goC3Count4:this.formData.goC3Count4*1,
									ngC3Count4:this.formData.ngC3Count4*1,
									goC4Count4:this.formData.goC4Count4*1,
									ngC4Count4:this.formData.ngC4Count4*1,
									goC5Count4:this.formData.goC5Count4*1,
									ngC5Count4:this.formData.ngC5Count4*1,
									goWgCount4:this.formData.goWgCount4*1,
									ngWgCount4:this.formData.ngWgCount4*1,
									ngJxCount4:this.formData.ngJxCount4*1,
									jxOKCount:this.formData.jxOKCount*1,
									jxVZNGCount:this.formData.jxVZNGCount*1,
									jxZZNGCount:this.formData.jxZZNGCount*1,
									jxIRNGCount:this.formData.jxIRNGCount*1,
									lotEndFlag:this.formData.lotEndFlag,
								};
								this.submitBtn.loading=true
								addUsmCdRecord(uploadData)
									.then(res=>{
										uni.showToast({
											title:'提交成功',
											duration:2000
										})
										uni.$u.sleep(2000).then(()=>{
											this.submitBtn.loading=false
											this.initData()
										})
									})
									.catch(err=>{
										uni.showToast({
											title: err.msg||' 服务器异常',
											icon:'error',
											duration:2000
										})
										uni.$u.sleep(2000).then(()=>{
												this.submitBtn.loading=false
										})
									})
							}
						}
						
					})
				})
				.catch(err=>{
					uni.showToast({
						title:'提交数据错误',
						icon:'error',
						duration:2000
					})
				})
			
		},
		formReset(){
			uni.redirectTo({
				url:'/pages/U-CD-statistial-input/U-CD-statistial-input'
			})
		},
		initData() {
			this.formData.machineNo = '';

			this.timer.machineNo = 0;
			this.disabled.machineNo = false;
			this.disabled.lotProductCode = false;
			this.disabled.lotNo = false;
			this.show.otherItem = false;

			this.formData.lotNo=''
			this.focus.lotNo=false
			this.timer.lotNo=0

			this.formData.lotProductCode=''
			this.focus.lotProductCode=false
			this.timer.lotProductCode=0

			this.formData.lotInfo = '';
			this.echo.lotNo = '';
			this.echo.productCode = '';
			this.timer.lotInfo = 0;
			
			this.show.lotInfo=false
			this.qrCode.lotNoFrom=0
			this.qrCode.lotNoLength=0
			this.qrCode.pnFrom=0
			this.qrCode.pnLength=0
			
			this.show.calendar=false
			this.formData.recordTimeDT=dayjs().format('YYYY-MM-DD')
			if(dayjs().hour()<7){
				this.formData.recordTimeDT=dayjs().subtract(1,'day').format('YYYY-MM-DD')
			} 
			this.formData.zlMachineNo=''
			this.show.zlPicker=false
			this.formData.btMachineNo=''
			this.show.btPicker=false
			
			this.submitBtn.loading=false
			this.$nextTick(() => {
				this.focus.machineNo = true;
			});
			
			this.show.colData1=false
			this.show.colData2=false
			this.show.colData3=false
			this.show.colData4=false
			
			this.formData.okCount1=0
			this.formData.ngCount1=0
			this.formData.jxngCount1=0
			this.formData.okCount2=0
			this.formData.ngCount2=0
			this.formData.jxngCount2=0
			this.formData.okCount3=0
			this.formData.ngCount3=0
			this.formData.jxngCount3=0
			this.formData.okCount4=0
			this.formData.ngCount4=0
			this.formData.jxngCount4=0
			this.formData.ymcCheck=''
			this.echo.ymcCheckUserFullName=''
			this.formData.lotEndFlag=false
		}
	}
};
</script>

<style scoped lang="scss">
.echo {
	margin-left: 80px;
}
.preWhite{
	white-space: pre;
}
.ngEcho{
	padding: 10px 0;
}
.wtc{
	border: 1px solid #ee7800
}

.cm{
	border: 1px solid #f6ad49; 
	margin-top: 10px;
}
.c2{
	border: 1px solid #ffd900; 
	margin-top: 10px;
}
.c3{
	border: 1px solid #7b8d42; 
	margin-top: 10px;
}
.c4{
	border: 1px solid #00a497; 
	margin-top: 10px;
}
.c5{
	border: 1px solid #2ca9e1; 
	margin-top: 10px;
}
.wg{
	border: 1px solid #674598; 
	margin-top: 10px;
}
.jx{
	border: 1px solid #8b968d; 
	margin-top: 10px;
}
.jiexi{
	border: 1px solid #383c3c; 
	margin-top: 10px;
}
.okCount{
	border: 1px solid #ffaaee;
	margin-top: 10px;
}

.sumText{
	color:#f56c6c;
	font-size:15px;
}

</style>
